package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 点赞的数据模型
 */
@Getter
@Setter
public class Praise {

    public static final Integer TYPE_REPLY = 0; //回复
    public static final Integer TYPE_STRATEGY = 1; //攻略
    public static final Integer TYPE_TRAVEL = 2; //游记
    public static final Integer TYPE_COMMENT = 3; //游记

    private Long id; //赞id

    private Long userId; //用户id

    private Long typeId; //被点赞的文章/攻略/游记的id

    private Integer type = TYPE_STRATEGY; //是类型 文章--0/攻略--1/游记--2

    private boolean state; //0(false)--取消赞 / 1(true)--赞

    private boolean readed; //0--未读(false) / 1(true)--已读


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    private String likeTitle;//点赞标题
    private String likeName;//点赞的人
    private String headImgUrl; //头像

}